/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.library.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.library.common.base.ApiResult;
import com.library.entity.DataDictionary;
import com.library.entity.ResourceEntity;
import com.library.entity.dto.QueryResourceDto;
import com.library.entity.dto.SearchDto;
import com.library.entity.vo.ArticleCatalogVo;
import com.library.entity.vo.BookResourceVo;

/**
 * 资源
 *
 * @author pig
 * @date 2023-10-31 14:34:33
 */
public interface ResourceService extends IService<ResourceEntity> {
    ApiResult saveAll();

    void pageView(Long resourceId);

    ApiResult getProductResourcesDetails(String resourceId);

    ApiResult search(SearchDto dto);

    ApiResult books(Long id);

    ApiResult video(Long id);

    ApiResult periodical(Long id);

    ApiResult particularsBooks(String bookId);

    ApiResult getJournalSearchResult(String searchKeywords,String openId);

    ApiResult getArticleCatalog(ArticleCatalogVo articleCatalogVo);

    ApiResult getArticleDetail(String id);

    ApiResult audio(Long id);

    ApiResult pageList(IPage page, LambdaQueryWrapper<ResourceEntity> wrapper);

    /** 通过id查询具体详情（包含评论、推荐） **/
    JSONObject detail(QueryResourceDto dto);

    boolean like(Long id,String openId);

    boolean cancelLike(Long id,String openId);
}
